//
//  GAKKINetworkResponseBaseModel.h
//  GANGAIKit
//
//  Created by fh on 2019/11/14.
//  Copyright © 2019 cashchina. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef NSString *GAKKINetServerErrorDomain;
/** 自定义错误域名 */
FOUNDATION_EXPORT GAKKINetServerErrorDomain const GAKKIServerErrorDomain;

/** 服务器响应状态 */
typedef NS_ENUM(NSInteger,GAKKINetServerStatus) {
    GAKKINetServerStatusSuccess, // 成功
    GAKKINetServerStatusFailed, // 失败
    GAKKINetServerStatusOtherError // 其他错误
};

/** 服务器响应数据状态 */
typedef NS_ENUM(NSInteger,GAKKINetServerDataStatus) {
    GAKKINetServerDataStatusCorrect, // 数据正确
    GAKKINetServerDataStatusWrong,  // 数据错误
    GAKKINetServerDataStatusNull   // 空数据:获取数据失败,请稍后再试!
};

/// 网络请求响应基本模型
@interface GAKKINetworkResponseBaseModel : NSObject

/// 源数据:这个根据后台返回的的数据格式设置对应的属性
@property (nonatomic, strong) id originData;

/// 登录超时标记
@property (nonatomic, assign) BOOL needLogin;

/// 服务器响应状态
@property (nonatomic, assign, readonly) GAKKINetServerStatus status;
/// 服务器响应数据状态
@property (nonatomic, assign, readonly) GAKKINetServerDataStatus dataStatus;

@end

NS_ASSUME_NONNULL_END
